import request from '@/utils/request'

// 查询轨迹列表
export function listLocus(query) {
  return request({ url: '/erecord/locus/list', method: 'get', params: query })
}

// 查询轨迹列表
export function listCarLocus(query) {
  return request({ url: '/erecord/locus/list/car', method: 'get', params: query })
}
// 查询轨迹列表
export function listUserLocus(query) {
  return request({ url: '/erecord/locus/list/user', method: 'get', params: query })
}

// 查询轨迹详细
export function getLocus(id) {
  return request({
    url: '/erecord/locus/' + id,
    method: 'get'
  })
}

// 新增轨迹
export function addLocus(data) {
  return request({
    url: '/erecord/locus',
    method: 'post',
    data: data
  })
}

// 修改轨迹
export function updateLocus(data) {
  return request({
    url: '/erecord/locus',
    method: 'put',
    data: data
  })
}

// 删除轨迹
export function delLocus(id) {
  return request({
    url: '/erecord/locus/' + id,
    method: 'delete'
  })
}
